<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <meta name="viewport"
          content="width=device-width, initial-scale=1.0, user-scalable=no, minimum-scale=1.0, maximum-scale=1.0"/>
    <title>华迅直购</title>
    <link rel="stylesheet" type="text/css" href="css/root.css"/>
    <link rel="stylesheet" type="text/css" href="css/entrance/home.css"/>
    <link rel="stylesheet" type="text/css" href="css/address/address.css"/>
    <script type="text/javascript" src="js/base/jquery-3.1.1.min.js?ver=2.0.4" charset="utf-8"></script>
    <script type="text/javascript" src="js/base/underscore-min.js"></script>
    <script src="js/base/api.js"></script>
    <script src="js/base/base.js"></script>
    <script src="js/base/vue.js"></script>
    <script src="js/base/vue-filter.js"></script>

    <script type="text/javascript" src="js/base/magiclamp.js?ver=2.0.3" charset="utf-8"></script>


    <script type="text/javascript" src="js/goods_comment_pro_modefy.js?ver=2" charset="utf-8"></script>

    <script src="https://unpkg.com/qiniu-js@2.2.2/dist/qiniu.min.js"></script>
</head>
<body>
<div id="address_modefy">
    <header>
        <a @click="page_back" v-if="baseConfig.is_phone" class="h-left back-btn"><i
                class="iconfont icon-fanhui"></i></a>
        <h1 class="h-title">商品评价 </h1>
    </header>
    <div id="root">
        <div class="pay-gs-list g-wrap margin-bottom">
            <div v-for="goodsitem in goods_order_item">
                <div class="g-item" @click="go_goods_detail(goodsitem.goods_id)">
                    <div class="g-item-wrap">
                        <span class="g-img">
                            <img :src="baseConfig.qn_host+goodsitem.small_image__fileurl+'?imageView2/1/w/70/h/70'">
                        </span>
                        <div class="g-i-info">
                            <p class="g-i-name order-goods-title">{{goodsitem.name}}</p>
                            <p class="order-goods-mark margin-bottom" v-if="goodsitem.gg">{{goodsitem.gg}}</p>
                            <p class="order-goods-mark" v-if="goodsitem.bz" v-text="'备注:'+goodsitem.bz"></p>
                            <p class="order-goods-mark" v-if="goodsitem.id">商品ID:{{goodsitem.goods_id}}</p>
                            <p class="order-count">
                            <span class="order-goods-price"
                                  v-text="price_filter(goodsitem.price-goodsitem.bu_tie_price)"></span>
                                <span class="order-goods-num">数量{{goodsitem.num}}</span>
                            </p>

                        </div>
                    </div>
                </div>
                <div style="margin: auto;width: 100%;text-align: center;color: #999999;padding-bottom: 1rem;">
                    您的评价决定我们的江湖地位，请认真对待～
                </div>
                <div style="margin: auto;width: 100%;text-align: center;color: #999999;padding-bottom: 0.5rem;">
                    综合评价
                </div>
                <div style="display: flex; flex-direction: row;justify-content:center;">
                    <img v-for="img in start_list" :id="'star_'+goodsitem.id+'_'+img.index"
                         @click="dafen(goodsitem, img.index)"
                         :src="img.index<=goodsitem.pingfen?'img2/star_big_light.png':'img2/star_big_normal.png'"
                         style="width: 2rem;margin: 0.5rem;">
                </div>
                <div style="margin: auto;width: 100%;text-align: center;color: #999999;padding-bottom: 0.5rem;">
                    <textarea rows="4" placeholder="评价"
                              style="width: 85%;border-radius: 10px;border: 1px solid #FFA028;"
                              v-model="goodsitem.pingjia" maxlength="50"></textarea>
                </div>
                <div style="margin: 1rem;">
                    <input type="radio" name="file_type" v-model="goodsitem.comment_file_type" value="1" disabled v-if="goodsitem.comment_videos_json.id" />
                    <input type="radio" name="file_type" v-model="goodsitem.comment_file_type" value="1"  v-if="!goodsitem.comment_videos_json.id" />
                    <span v-if="goodsitem.comment_videos_json.id" style="color: #cccccc;">图片</span>
                    <span v-if="!goodsitem.comment_videos_json.id" >图片</span>
                    <input type="radio" name="file_type" v-model="goodsitem.comment_file_type" value="2" disabled v-if="goodsitem.comment_files_json.length>0" />
                    <input type="radio" name="file_type" v-model="goodsitem.comment_file_type" value="2"  v-if="!goodsitem.comment_files_json.length>0" />
                    <span v-if="goodsitem.comment_files_json.length>0" style="color: #cccccc;">视频</span>
                    <span v-if="!goodsitem.comment_files_json.length>0" >视频</span>
                </div>
                <div v-if="goodsitem.comment_file_type==1" style="padding-left: 2rem">
                    <img style="margin: 0.1rem;" :src="baseConfig.qn_host + img.fileurl+'?imageView2/1/w/100/h/100'"
                         v-for="img in goodsitem.comment_files_json" @click="del_file_img(img, goodsitem)">

                </div>

                <div style="height: 4rem;padding-top: 1rem;padding-left: 2rem;"  v-if="goodsitem.comment_file_type==1">
                    <a href="javascript:;" class="file" v-if="goodsitem.comment_files_json.length<9">
                        <input id="fileBtn1" style="background-image: url('img/comment_jiahao.png')" type="file"
                               @change="upload_img('fileBtn1', goodsitem);" accept="image/*"/>
                    </a>
                </div>

                <div v-if="goodsitem.comment_file_type==2" style="padding-left: 2rem">
                    <img style="margin: 0.1rem;" v-if="goodsitem.comment_videos_img__fileurl" @click="del_video_img(goodsitem)"
                         :src="baseConfig.qn_host + goodsitem.comment_videos_img__fileurl+'?imageView2/1/w/90/h/90'" >

                </div>
                <div style="height: 4rem;padding-top: 1rem;padding-left: 2rem"  v-if="goodsitem.comment_file_type==2">
                    封面:
                    <a href="javascript:;" class="file" >
                        <input id="fileBtn2" style="background-image: url('img/comment_jiahao.png')" type="file"
                               @change="upload_video_img('fileBtn2', goodsitem);" accept="image/*"/>
                    </a>
                </div>
                <div class="pengyou_video_comment_edit" style="margin: 2rem;" v-if="goodsitem.comment_file_type==2&&goodsitem.comment_videos_json.id" >
                    <video :src="baseConfig.qn_host + goodsitem.comment_videos_json.fileurl"   :id="'video'+goodsitem.id"
                           style="width:100%;"
                           x-webkit-airplay="true" preload="auto"
                           x5-video-player-type="h5" webkit-playsinline="true"
                           controls
                           playsinline
                           :poster="get_fengmian(goodsitem.video_img__fileurl, goodsitem.small_image__fileurl)"
                    >

                    </video>
                </div>
                <div style="margin: 2rem;" v-if="goodsitem.comment_file_type==2&&goodsitem.comment_videos_json.id">
                    <a href="javascript:void(0);" @click="del_video(goodsitem)"
                       style="float: right;margin-right: 0.5rem;font-size: 1.2rem;color:blue;"
                    ><u>删除视频</u></a>
                </div>
                <div style="height: 4rem;padding-top: 1rem;padding-left: 2rem"  v-if="goodsitem.comment_file_type==2">

                    <a href="javascript:;" class="file" >
                        <label for="fileBtn3">视频:</label>
                        <input id="fileBtn3" style="background-image: url('img/comment_jiahao.png')" type="file"
                               @change="upload_video('fileBtn3', goodsitem);" accept="video/*"/>
                    </a>

                </div>
                <br/>
                <br/>
                <br/>
                <br/>
            </div>


        </div>

        <button class="add-bom-btn" type="button" @click="save_comment()">提交</button>
    </div>

</div>
</body>
</html>